# -*- coding: UTF-8 -*- 
import pyodbc
import pprint
import random

conn = pyodbc.connect("DSN=ORACLE_SAMPLE;UID=qinyi365;PWD=qinyi365")
cursor = conn.cursor()
cursor.execute("select ID,SCAN_MAN from TAB_GPRS_GK_SCAN;")
records=cursor.fetchall()
pprint.pprint(records)

inset_str = "insert into TAB_CLASS values"
chinese_str = u'中国下雪'
chinese_str_gbk=chinese_str.encode('gbk')
cursor.execute("insert into TAB_CLASS values('123123',?)",chinese_str_gbk)
conn.commit()

cursor.execute("select * from TAB_CLASS ;")
records=cursor.fetchall()
pprint.pprint(records)



